package com.zygh.policeasset.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/AssetsIdTypeMapper.class */
public interface AssetsIdTypeMapper {
    @Insert({"insert into assets_id_type (asset_id,steps_id, asset_type,do_time) ", "values (#{assetId,jdbcType=INTEGER}, #{stepsId,jdbcType=INTEGER}, #{assetType,jdbcType=VARCHAR},#{doTime,jdbcType=VARCHAR}) "})
    int add(@Param("assetId") Integer num, @Param("stepsId") Integer num2, @Param("assetType") String str, @Param("doTime") String str2);

    @Update({"update assets_id_type set steps_id=#{stepsId},do_time=#{doTime}where asset_id = #{assetId} and asset_type = #{assetType}"})
    int updateStepsId(@Param("assetId") Integer num, @Param("stepsId") Integer num2, @Param("assetType") String str, @Param("doTime") String str2);

    @Insert({" insert into assets_id_type select id as asset_id,#{nextId} as steps_id,#{assetsType} as asset_type,#{doTime} as do_time from `assets_basics` where build_num = #{buildNum} and section_name = #{sectionName}"})
    int selectToInsert(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Insert({" insert into assets_id_type select id as asset_id,#{nextId} as steps_id,#{assetsType} as asset_type,#{doTime} as do_time from `assets_hardwit` where build_num = #{buildNum} and section_name = #{sectionName}"})
    int selectToInserth(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Insert({" insert into assets_id_type select id as asset_id,#{nextId} as steps_id,#{assetsType} as asset_type,#{doTime} as do_time from `assets_softwit` where build_num = #{buildNum} and section_name = #{sectionName}"})
    int selectToInserts(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Update({"  update  assets_id_type t1 INNER JOIN assets_basics t2 on t1.`asset_id` = t2.id and t1.asset_type=t2.assets_status set t1.asset_id = t2.id,t1.steps_id = #{nextId},t1.asset_type =#{assetsType},t1.do_time = #{doTime} where t2.build_num = #{buildNum} and t2.section_name = #{sectionName}"})
    int selectToUpdate(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Update({"  update  assets_id_type t1 INNER JOIN assets_hardwit t2 on t1.`asset_id` = t2.id  and t2.assets_status = t1.asset_type  set t1.asset_id = t2.id,t1.steps_id = #{nextId},t1.asset_type =#{assetsType},t1.do_time = #{doTime} where t2.build_num = #{buildNum} and t2.section_name = #{sectionName}"})
    int selectToUpdateh(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Update({"  update  assets_id_type t1 INNER JOIN assets_softwit t2 on t1.`asset_id` = t2.id and t2.assets_status = t1.asset_type  set t1.asset_id = t2.id,t1.steps_id = #{nextId},t1.asset_type =#{assetsType},t1.do_time = #{doTime} where t2.build_num = #{buildNum} and t2.section_name = #{sectionName}"})
    int selectToUpdates(@Param("nextId") Integer num, @Param("assetsType") String str, @Param("doTime") String str2, @Param("buildNum") String str3, @Param("sectionName") String str4);

    @Select({" select count(*) from  assets_id_type  where asset_id = #{assetsid} and asset_type = #{type}"})
    int findidbytype(@Param("assetsid") Integer num, @Param("type") String str);
}